import { createRouter, createWebHashHistory } from "vue-router";
import HomeView from "../views/HomeView.vue";

const routes = [
  {
    path: "/ccc",
    name: "home",
    component: HomeView,
  },
  {
    path: "/",
    name: "home",
    component: () => import("@/views/layout/LayoutContainer.vue"),
    redirect: "/person/info",
    children: [
      {
        path: "/person/info",
        component: () => import("@/views/personinfo/ResumeInfo.vue"),
      },
      {
        path: "/person/blog",
        component: () => import("@/views/blog/PersonBlog.vue"),
      },
      {
        path: "/person/project",
        component: () => import("@/views/project/ProjectInfoAll.vue"),
      },
      {
        path: "/person/linkinfo",
        component: () => import("@/views/linkinfo/LinkInfo.vue"),
      },
      {
        path: "/person/resource",
        component: () => import("@/views/myresource/MyResource.vue"),
      },
      {
        path: "/person/resumefile",
        component: () => import("@/views/myfile/ResumeFile.vue"),
      },
    ],
  },
  {
    path: "/about",
    name: "about",
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () =>
      import(/* webpackChunkName: "about" */ "../views/AboutView.vue"),
  },
];

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export default router;
